home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / DU Folder / Calc / Sources / Include / CalcFrm.h < prev    next >
Encoding:
Text File  |  1995-11-02  |  2.2 KB  |  65 lines  |  [TEXT/MPS ]

  1. //    Copyright © 1995 Apple Computer, Inc. All rights reserved.
  2. //    Release Version:    $ 1.0 d11 $
  3.  
  4. #ifndef _CALCFRAME_
  5. #define _CALCFRAME_
  6.  
  7. //=======================================================================
  8. #ifndef CALCPRT_H
  9. #include "CalcPrt.h"        // CCalcPart
  10. #endif
  11.  
  12. // ----- Framework Includes -----
  13. #ifndef FWFRAME_H
  14. #include <FWFrame.h>        // FW_CFrame
  15. #endif
  16.  
  17. //=======================================================================
  18. class FW_CLASS_ATTR CCalcPart;
  19. class FW_CLASS_ATTR FW_CPushButton;
  20. class FW_CLASS_ATTR FW_CPictureShape;
  21. class FW_CLASS_ATTR FW_CString32;
  22. class FW_CLASS_ATTR FW_CHandleFunctionConnection;
  23. class FW_CLASS_ATTR FW_CNotification;
  24.  
  25. //=======================================================================
  26. class FW_CLASS_ATTR CCalcFrame : public FW_CFrame, public FW_MReceiver {
  27. public:
  28.                         CCalcFrame(Environment* ev, 
  29.                                     ODFrame* odFrame, 
  30.                                     FW_CPresentation* presentation, 
  31.                                     CCalcPart* calcPart);
  32.     virtual             ~CCalcFrame();
  33. protected:
  34. // overrides
  35.     virtual void        FacetAdded(Environment* ev, ODFacet* facet);
  36.     virtual ODShape*     AdjustUsedShape(Environment* ev, ODShape* suggestedUsedShape);
  37.     virtual ODShape*     AdjustActiveShape(Environment* ev, ODFacet* facet, ODShape* suggestedActiveShape);
  38.     virtual void        Draw(Environment *ev, 
  39.                              ODFacet* odFacet, 
  40.                              ODShape* invalidShape);
  41.     virtual void         CreateSubViews(Environment* ev);
  42.     virtual void         HandleNotification(const FW_CNotification& notification);
  43. // new members
  44.     virtual void             MyInitPicture(Environment* ev);
  45.     virtual void             MyTestCalc(Environment* ev);
  46.     virtual FW_CString32*     MyNumToString(CalcFloat number, short digitsDesired);
  47.     virtual void             MyDrawString(FW_CGraphicContext& fc, FW_CPoint& botLeft, 
  48.                                                         FW_CString32* string);
  49. private:
  50.     CCalcPart*                         fCalcPart;
  51.     FW_CPushButton*                    fButton;
  52.     ODID                            fButtonID;
  53.     FW_CHandleFunctionConnection     fConnection;
  54.     ODTypeToken                        fButtonNotificationToken;
  55.     FW_CPictureShape*                fPictShape;            // Calculator
  56.     FW_CString32*                    fLoanString;
  57.     FW_CString32*                    fInterestString;
  58.     FW_CString32*                    fYearsString;
  59.     FW_CString32*                    fPaymentString;
  60.     FW_CRect                        fPictRect;
  61. };
  62.  
  63. //=======================================================================
  64. #endif
  65.